<!doctype html>
<html class="no-js">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>南京大学职业咨询室预约平台</title>
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='assets/i/ico_128X128.ico') }}">
    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="{{ url_for('static', filename='assets/i/main_icon.png') }}">
    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <link rel="apple-touch-icon-precomposed" href="{{ url_for('static', filename='assets/i/main_icon.png') }}">
    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="{{ url_for('static', filename='assets/i/main_icon.png') }}">
    <meta name="msapplication-TileColor" content="#0e90d2">

    <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/amazeui.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='assets/css/app.css', v='1.4') }}">
    <script src="{{ url_for('static', filename='assets/js/jquery.min.js') }}"></script>
    <script src="{{ url_for('static', filename='assets/js/amazeui.min.js') }}"></script>
     <script type="text/javascript">
         function export_tch_tables(){
        document.njusub.action="/export_tch";
        document.njusub.submit();
    }

    function import_tch_tables(){
        document.njusub.action="/import_tch";
        document.njusub.submit();
    }

    function logout_users(){
        document.njusub.action="/logout";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_show_rs () {
        document.njusub.action="/admin_get_records_page";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_show_teachers () {
        document.njusub.action="/admin_get_teacher_lists";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_show_students () {
        document.njusub.action="/admin_get_student_lists";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_show_option()
    {
        document.njusub.action="/admin_get_options";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_edit_article()
    {
        document.njusub.action="/admin_edit_article";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_article_list()
    {
        document.njusub.action="/admin_article_lists";
        document.njusub.method="post";
        document.njusub.submit();
    }
    function admin_edit_slider()
    {
        document.njusub.action="/admin_edit_slider";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function admin_slider_list()
    {
        document.njusub.action="/admin_slider_lists";
        document.njusub.method="post";
        document.njusub.submit();
    }

    function goto_index()
    {
        window.location.href = "/index";
    }

    function import_tch_arrange()
    {
        document.njusub.action="/import_stus_from_tch";
        document.njusub.submit();
    }

    </script>
    <style>
    
    .main {
        text-align: center;
    }
    
    </style>
</head>

<body>
<div class="admin-header">
    <!--<div class="header-back" onclick="history.back()">返回</div>-->
    <div class="header-title">管理员控制台</div>
</div>
<div class="admin-content">
    <div class="alert alert-warning">
        {% with messages = get_flashed_messages() %}
        {% if messages %}
        <ul class=flashes>
            {% for message in messages %}
            <div class="am-alert am-alert-secondary" data-am-alert>
                <button type="button" class="am-close">&times;</button>
                <div style="text-align: center;">{{ message }}</div>
            </div>
            {% endfor %}
        </ul>
        {% endif %}
        {% endwith %}
    </div>
    <div class="Name">
        <njup>你好，管理员</njup>
    </div>
    <!--在这里编写你的代码-->
    <div class="main" style="margin:20px 0 0 0;">
        <div class="am-cf">
            <div class="am-form-group">
                <button type="submit" style="width:120px;" id="show_tl" name="showtl" value="" class="am-btn am-btn-primary" onclick="admin_show_teachers()">咨询师名单</button>
                <button type="submit" style="width:120px;" id="show_st" name="showst" value="" class="am-btn am-btn-primary" onclick="admin_show_students()">学生名单</button>
                
            </div>
            
            <div class="am-form-group"></div>
            <div class="am-form-group">
                <button type="submit" style="width:120px;" id="show_rs" name="showrs" value="" class="am-btn am-btn-primary" onclick="admin_show_rs()">预约记录</button>
                <button type="submit" style="width:120px;" id="show_op" name="showop" value="" class="am-btn am-btn-primary" onclick="admin_show_option()">咨询选项</button>
            </div>
            <div class="am-form-group"></div>


            <div class="am-form-group">
                <button type="submit" style="width:120px;" id="show_article" name="showrs" value="" class="am-btn am-btn-primary" onclick="admin_article_list()">故事列表</button>
                <button type="submit"  style="width:120px;" id="add_article" name="showop" value="" class="am-btn am-btn-primary" onclick="admin_edit_article()">添加故事</button>
            </div>
            <div class="am-form-group"></div>
             <div class="am-form-group">
                <button type="submit" style="width:120px;" id="show_slider" name="showrs" value="" class="am-btn am-btn-primary" onclick="admin_slider_list()">滚动图列表</button>
                <button type="submit"  style="width:120px;" id="add_slider" name="showop" value="" class="am-btn am-btn-primary" onclick="admin_edit_slider()">添加滚动图</button>
            </div>
            <div class="am-form-group"></div>
            <form name="njusub">
                {{ form.csrf_token }}
                <div class="am-form-group">
                    <button type="submit" style="width:120px;" id="export_tch" value="" class="am-btn am-btn-default am-btn-sm" onclick="export_tch_tables()">导&nbsp;出&nbsp;&nbsp;教&nbsp;师<i class="am-icon-cloud-download"></i></button>
                    <button type="submit" style="width:120px;" id="import_tch_list" value="" class="am-btn am-btn-default am-btn-sm" onclick="import_tch_tables()"><i class="am-icon-cloud-upload"></i>导&nbsp;入&nbsp;&nbsp;教&nbsp;师</button>
                </div>
                <div class="am-form-group">
                    <button type="submit" style="width:120px;" id="export_others" value="" class="am-btn am-btn-default am-btn-sm" onclick="" disabled="disabled">导&nbsp;出&nbsp;&nbsp;其&nbsp;他<i class="am-icon-cloud-download"></i></button>
                    <button type="submit" style="width:120px;" id="import_tch_list" value="" class="am-btn am-btn-default am-btn-sm" onclick="import_tch_arrange()"><i class="am-icon-cloud-upload"></i>导&nbsp;入&nbsp;&nbsp;预&nbsp;约</button>
                </div>
                <div class="am-form-group"></div>
                <br>
                <div class="am-form-group">
                    <button type="submit" style="width:120px;" id="logout" name="logout" value="" class="am-btn am-btn-danger" onclick="logout_users()">退出登录</button>
                    <button type="button" style="width:120px;" id="gotoIndex" name="gotoIndex" value="" class="am-btn am-btn-danger" onclick="goto_index()">返回首页</button>

                </div>

            </form>

        </div>
    </div>
</div>
    

</body>

</html>
